package com.hmall.common.client;

import com.hmall.common.entity.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("userservice")
public interface UserClient {

    /**
     * 按 ID 获取地址
     *
     * @param id 编号
     * @return {@link Address}
     */
    @GetMapping("address/{id}")
    Address getAddressById(@PathVariable("id") Long id);
}
